precision mediump float;

uniform vec2 u_resolution;
uniform float u_time;

void main() {
    vec2 st = gl_FragCoord.xy / u_resolution.xy;
    st.x += 0.5 * sin(u_time);
    st.y += 0.5 * cos(u_time);

    vec3 color = vec3(0.0);
    color.r = mix(0.0, 1.0, clamp(dot(st, vec2(0.5)), 0.0, 1.0));
    color.g = fract(sin(dot(st, vec2(12.9898, 78.233))) * 43758.5453);
    color.b = length(st);

    gl_FragColor = vec4(color, 1.0);
}
